# redis-sentinel {{ redis_version }} configuration file
# sentinel_{{ redis_sentinel_port }}.conf

daemonize {{ redis_daemonize }}
dir {{ redis_sentinel_dir }}
pidfile {{ redis_sentinel_pidfile }}
port {{ redis_sentinel_port }}
bind {{ redis_sentinel_bind }}

{% for master in redis_sentinel_monitors -%}
sentinel monitor {{ master.name }} {{ master.host }} {{ master.port }} {{ master.quorum|d('2') }}
{% for option in ('auth_pass', 'down_after_milliseconds', 'parallel_syncs', 'failover_timeout', 'notification_script', 'client_reconfig_script') -%}
{% if master[option] is defined and master[option] -%}
sentinel {{ option|replace('_', '-') }} {{ master.name }} {{ master[option] }}
{% endif %}
{% endfor -%}

{% endfor -%}

logfile {{ redis_sentinel_logfile }}
syslog-enabled {{ redis_syslog_enabled }}
syslog-ident {{ redis_sentinel_syslog_ident }}
syslog-facility {{ redis_syslog_facility }}
